/**
 * StdViewRenderExecuteResult.java created by zhangzhidong 
 * at 下午9:38:02 2017年4月28日
 */
package cn.edu.bjtu.entity.impl;

import java.util.Map;

import cn.edu.bjtu.entity.ViewRenderExecuteResult;

/**
 * @author zhangzhidong<br>
 * comment generated at 2017年4月28日下午9:38:02<br>
 * 
 */
public class StdViewRenderExecuteResult implements ViewRenderExecuteResult<Map<String,Object>>{
	boolean isAsync = false;
	boolean success = false;
	String msg = null;
	Map<String,Object> map;
	public StdViewRenderExecuteResult(boolean async,boolean success,String msg,Map<String,Object> map) {
		this.isAsync = async;
		this.success = success;
		this.msg = msg;
		this.map = map;
	}
	@Override
	public boolean isAsync() {
		return isAsync;
	}
	@Override
	public boolean isSuccess() {
		return success;
	}

	@Override
	public boolean isFailed() {
		return !isSuccess();
	}

	@Override
	public String getTipMessage() {
		return msg;
	}

	@Override
	public boolean isExecuting() {
		return false;
	}

	@Override
	public Map<String, Object> getResultMapForRender() {
		return map;
	}
	@Override
	public Map<String, Object> javaClassResult() {
		return getResultMapForRender();
	}

}
